package com.learn.im.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "chat_attach")
public class ChatAttach implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 关联消息id
     */
    @TableField(value = "chat_id")
    private Integer chatId;

    /**
     * 源文件名
     */
    @TableField(value = "origin_name")
    private String originName;

    /**
     * 文件相对路径 Y/m/name
     */
    @TableField(value = "file_path")
    private String filePath;

    /**
     * 保存的真实文件名
     */
    @TableField(value = "real_name")
    private String realName;

    /**
     * 文件大小
     */
    @TableField(value = "size")
    private Double size;

    /**
     * 文件创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    private static final long serialVersionUID = 1L;
}
